/**
 * Copyright 2023 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import '~/styles/variables';

$slideDuration: 0.5;
$fadeDelay: $slideDuration - $fadeDuration;

.nav {
  background-color: $dark;
  color: $light;
  display: flex;
  flex-direction: column;
  height: 100vh;
  justify-content: space-between;
  padding: 6.35rem 5.5rem 4.5rem 5.5rem;
  position: fixed;
  right: 0;
  top: 0;
  transform: translate(100%, 0);
  transition: all 0.5s ease-in-out;
  width: 200%;
  width: 90vw;
  z-index: 98;

  @media screen and (min-width: $tablet-l) {
    padding: 12.7rem 11.1rem 9.2rem 11.1rem;
    width: 50vw;
  }

  &.isOpen {
    transform: translate(0, 0);

    .mainLinks {
      a {
        opacity: 1;
        transform: translate(0, 0);
      }
    }

    .logo,
    .secondaryLinks a {
      opacity: 1;
    }
  }

  .mainLinks {
    a {
      color: $light;
      display: block;
      font-family: $font_heading;
      font-feature-settings: 'pcap';
      font-size: 7.2rem;
      font-style: normal;
      font-weight: 400;
      letter-spacing: -0.05em;
      margin-bottom: 4rem;
      opacity: 0;
      text-decoration: none;
      text-transform: lowercase;
      transform: translate(0, 10px);

      transition: color 0.2s ease-in-out,
        opacity $fadeDuration $fadeDelay ease-out,
        transform $fadeDuration $fadeDelay ease-out;

      &:hover {
        color: $mid_grey;
      }

      &.active {
        color: $tennis;
      }
    }
  }

  .secondaryLinks a {
    color: $light;
    display: block;
    font-family: $font_text;
    font-size: 1.5rem;
    font-style: normal;
    font-weight: 400;
    line-height: 140%;
    margin-bottom: 2.8rem;
    opacity: 0;
    text-decoration: none;

    transition: color 0.2s ease-in-out,
      opacity $fadeDuration $fadeDelay ease-out;
    &:hover {
      color: $mid_grey;
    }

    svg {
      margin-left: 0.4rem;
    }
  }
  .logo {
    opacity: 0;
    transition: opacity $fadeDuration $fadeDelay ease-out;
  }
}
